﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GestionePolveriLib.BL;

namespace GestionePolveri2
{
    public partial class ModificaScortaMinimaDialog : Form
    {
        private Polvere m_polvere = null;

        public Polvere Polvere
        {
            get { return m_polvere; }
            set { m_polvere = value; }
        }

        public ModificaScortaMinimaDialog()
        {
            InitializeComponent();
        }

        public void Initiliaze()
        {
            this.lblCodPolvere.Text = string.Format("Codice Polvere: {0}", m_polvere.CodicePolvere);
            this.lblDescrPolvere.Text = string.Format("Descr. Polvere: {0}", m_polvere.Descrizione);
            this.textEdit1.Text = m_polvere.ScortaMinima.ToString();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            m_polvere.ScortaMinima = double.Parse(this.textEdit1.Text);
        }
    }
}
